set more off

cd ${glOut}

use ${glData}/data_aggregate, clear

* list of control variables
local controls "inc female age1 age2 age3 d_totalvoters totpop pct_school"


***********
* Table 1 *
***********

local vars "vs inc female age d_totalvoters totpop pct_school"

label var vs            "Candidate Vote Share"
label var inc           "Incumbent"
label var female        "Female"
label var age           "Age"
label var d_totalvoters "Number of Voters (Thousand)"
label var totpop        "Population (Thousand)"
label var pct_school    "Pct. School Population"

replace d_totalvoters = d_totalvoters / 1000
replace totpop = totpop / 1000

quietly reg vs d1 vspr_p1 vspr_p1 `controls', cluster(dist_year)
gen s1 = e(sample)

eststo clear
eststo: quietly estpost sum vs inc female age d1 color1 ideo1 d2 color2 ideo2 if s1 == 1

esttab using "table_sum_cand_tmp.tex",  ///
  replace label cells("mean(fmt(%5.3f)) sd min max count(fmt(%6.0fc))") ///
  noobs booktabs nomtitles fragment nonumbers alignment(rrrcc) ///
  collabels("{Mean}" "{Std Dev}" "{Min}" "{Max}" "{N}")

eststo clear
eststo: quietly estpost sum vspr_p1 vspr_p2 d_totalvoters totpop pct_school if s1 == 1

esttab using "table_sum_emd_tmp.tex",  ///
  replace label cells("mean(fmt(%5.3f)) sd min max count(fmt(%6.0fc))") ///
  noobs booktabs nomtitles fragment nonumbers alignment(rrrcc) ///
  collabels("{Mean}" "{Std Dev}" "{Min}" "{Max}" "{N}")
  
quietly {

	capture log close
  
	log using "table1.tex", text replace

	noisily display "\begin{table}[htbp]\centering"
	noisily display "\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}"
	noisily display "\vskip25pt"
	noisily display "\caption{Summary Statistics} \label{table_sum}"
	noisily display "\begin{tabular}{l*{4}{S}c}"
	noisily display "\midrule\midrule"
	noisily display "\addlinespace"
	noisily display "\multicolumn{6}{l}{\textit{Candidate-Level Variables}}\\"
	noisily display "\addlinespace"	
	noisily display "\input{table_sum_cand_tmp.tex}"
	noisily display "\midrule"
	noisily display "\addlinespace"
	
	noisily display "\multicolumn{6}{l}{\textit{Town-Level Variables}}\\"
	noisily display "\addlinespace"	
	noisily display "\input{table_sum_emd_tmp.tex}"	
	
	noisily display "\midrule\midrule"
	noisily display "\end{tabular}"
	noisily display "\vskip25pt"
	noisily display "\end{table}"
  
	log off

	log close
  
}


***********
* Table 2 *
***********

eststo clear
eststo est1: quietly areg vs d1                vspr_p1 d1Xvspr_p1                              `controls', a(dist_year)  cluster(dist_year)
eststo est2: quietly areg vs    color1         vspr_p1            color1Xvspr_p1               `controls', a(dist_year)  cluster(dist_year)
eststo est3: quietly areg vs           ideo1   vspr_p1                           ideo1Xvspr_p1 `controls', a(dist_year)  cluster(dist_year)
eststo est4: quietly areg vs d1 color1 ideo1   vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1 `controls', a(dist_year)  cluster(dist_year)

quietly test d1Xvspr_p1 = color1Xvspr_p1
local pdcolor = r(p)
quietly test d1Xvspr_p1 = ideo1Xvspr_p1
local pdideo = r(p)
quietly test color1Xvspr_p1 = ideo1Xvspr_p1
local pcolorideo = r(p)

local table_title = "Ballot Position, Partisan Color, Ideology, and Party Voting"
local table_name  = "table2"

esttab using "`table_name'_tmp.tex", ///
	replace label nomtitles fragment booktabs nonumbers nolines ///
	star(* 0.1 ** 0.05 *** 0.01) nodepvar nonote b(%5.3f) se(%5.3f) noobs ///
	keep  (d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1) ///
	order (d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1) ///
	substitute("XX" "$\times$ \\ \hspace{6pt}") 
	

quietly {

	capture log close
  
	log using "`table_name'.tex", text replace

	noisily display "\begin{table}[htbp]"
	noisily display "\centering"
    noisily display "\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}"	
	noisily display "\begin{threeparttable}"
	noisily display "\caption{`table_title'}"
	noisily display "\label{`table_name'}"
	noisily display "\begin{tabular}{lcccc}"
	noisily display "\midrule\midrule"
	noisily display "&\multicolumn{4}{c}{Outcome: Vote Share}\\"
	noisily display "\cmidrule(r){2-5}"
    noisily display "&\multicolumn{1}{c}{(1)} &\multicolumn{1}{c}{(2)}&\multicolumn{1}{c}{(3)} &\multicolumn{1}{c}{(4)}\\"
	noisily display "\midrule"
	noisily display "\addlinespace"
	noisily display "\expandableinput `table_name'_tmp.tex"
	noisily display "\addlinespace"
	noisily display "\midrule"
	noisily display _asis " $ p$-value of equality test: & \multicolumn{3}{c}{$\beta_5 = \beta_6 $} &" %5.3f `pdcolor'  "\\"
	noisily display _asis "  & \multicolumn{3}{c}{$\beta_5 = \beta_7 $} &" %5.3f `pdideo' "\\"
	noisily display _asis "  & \multicolumn{3}{c}{$\beta_6 = \beta_7 $} &" %5.3f `pcolorideo'  "\\"
	noisily display "\midrule"
	noisily display "District & \multirowcell{2}{\checkmark} & \multirowcell{2}{\checkmark} & \multirowcell{2}{\checkmark} & \multirowcell{2}{\checkmark} \\"
	noisily display "\hspace{6pt} \$\times$ Year FE &  &  &  & \\"
	noisily display "\midrule"
	noisily display "\addlinespace"		
	
	noisily display "Obs."
	forvalues i = 1/4 {
		estimates restore est`i'
		local obs = e(N)
		noisily display "&" %6.0fc `obs'
	}
	
	noisily display "\\"	
	noisily display "\midrule\midrule"
	noisily display "\end{tabular}"
	noisily display "\begin{tablenotes}"
	noisily display "\footnotesize"
	noisily display "\item \textit{Notes:}"
	noisily display "Robust standard errors, clustered at the District \$\times$ Year level, are in parentheses."
	noisily display "Control variables are included in all columns."
	noisily display "\item *** \$p<0.01$; ** \$p<0.05\$; * \$p<0.1\$."
	noisily display "\end{tablenotes}"
	noisily display "\end{threeparttable}"
	noisily display "\end{table}"
  
	log off
  
	log close
}


***********
* Table 3 *
***********

quietly reg vs d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1 `controls' pct_school, cluster(dist_year)
gen sample3 = e(sample)

sum pct_school if sample3 == 1, detail
local sch_high = r(p50)

gen sch_high = (pct_school > `sch_high') if sample3 == 1


* test for coefficient eqiality

eststo clear
eststo est1: quietly reg vs d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1 `controls' dist_year_dum* if sch_high == 0
eststo est2: quietly reg vs d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1 `controls' dist_year_dum* if sch_high == 1
quietly suest est1 est2, cluster(dist_year)
quietly test [est1_mean]d1Xvspr_p1 = [est2_mean]d1Xvspr_p1
local pval11 = r(p)
quietly test [est1_mean]color1Xvspr_p1 = [est2_mean]color1Xvspr_p1
local pval12 = r(p)
quietly test [est1_mean]ideo1Xvspr_p1 = [est2_mean]ideo1Xvspr_p1
local pval13 = r(p)

eststo clear
eststo est1: quietly reg vs d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1 `controls' dist_year_dum* if  inc_run == 0
eststo est2: quietly reg vs d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1 `controls' dist_year_dum* if  inc_run == 1
quietly suest est1 est2, cluster(dist_year)
quietly test [est1_mean]d1Xvspr_p1 = [est2_mean]d1Xvspr_p1
local pval21 = r(p)
quietly test [est1_mean]color1Xvspr_p1 = [est2_mean]color1Xvspr_p1
local pval22 = r(p)
quietly test [est1_mean]ideo1Xvspr_p1 = [est2_mean]ideo1Xvspr_p1
local pval23 = r(p)


eststo clear
eststo est1: quietly areg vs d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1 `controls' if sch_high == 0, a(dist_year) cluster(dist_year)
eststo est2: quietly areg vs d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1 `controls' if sch_high == 1, a(dist_year) cluster(dist_year)
eststo est3: quietly areg vs d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1 `controls' if inc_run == 0, a(dist_year) cluster(dist_year)
eststo est4: quietly areg vs d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1 `controls' if inc_run == 1, a(dist_year) cluster(dist_year)

local table_title = "Electoral Context and the Relative Saliency of Cues"
local table_name  = "table3"

esttab using "`table_name'_tmp.tex", ///
	replace label nomtitles fragment booktabs nonumbers nolines ///
	star(* 0.1 ** 0.05 *** 0.01) nodepvar nonote b(%5.3f) se(%5.3f) noobs ///
	keep  (d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1) ///
	order (d1 color1 ideo1 vspr_p1 d1Xvspr_p1 color1Xvspr_p1 ideo1Xvspr_p1) ///
	substitute("XX" "$\times$ \\ \hspace{6pt}" "beta\_" "beta_") 

quietly {
	capture log close
  
	log using "`table_name'.tex", text replace

	noisily display "\begin{table}[htbp]"
	noisily display "\centering"
    noisily display "\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}"	
	noisily display "\begin{threeparttable}"
	noisily display "\caption{`table_title'}"
	noisily display "\label{`table_name'}"
	noisily display "\begin{tabular}{lcccc}"
	noisily display "\midrule\midrule"
	noisily display "&\multicolumn{4}{c}{Outcome: Vote Share}\\"
	noisily display "\cmidrule(r){2-5}"
	noisily display "&\multicolumn{1}{c}{School-Age} &\multicolumn{1}{c}{School-Age}&\multicolumn{1}{c}{Open} &\multicolumn{1}{c}{Incumbent}\\"
	noisily display "&\multicolumn{1}{c}{Population} &\multicolumn{1}{c}{Population}&\multicolumn{1}{c}{Seat} &\multicolumn{1}{c}{Runs}\\"
	noisily display "&\multicolumn{1}{c}{(Low)} &\multicolumn{1}{c}{(High)}&&\\"
	noisily display "\cmidrule(r){2-2}\cmidrule(r){3-3}\cmidrule(r){4-4}\cmidrule(r){5-5}"    
	noisily display "&\multicolumn{1}{c}{(1)} &\multicolumn{1}{c}{(2)}&\multicolumn{1}{c}{(3)} &\multicolumn{1}{c}{(4)}\\"
	noisily display "\midrule"
	noisily display "\addlinespace"
	noisily display "\expandableinput `table_name'_tmp.tex"
	noisily display "\midrule"	
	noisily display _asis " $ p$-value of equality test: & $\beta_5^{Low} = \beta_5^{High}$ & " %5.3f `pval11' "& $\beta_5^{Open} = \beta_5^{Inc}$ & " %5.3f `pval21' "\\"
	noisily display "\addlinespace"			
	noisily display _asis " & $\beta_6^{Low} = \beta_6^{High}$ & " %5.3f `pval12' "& $\beta_6^{Open} = \beta_6^{Inc}$ & " %5.3f `pval22' "\\"
	noisily display "\addlinespace"			
	noisily display _asis " & $\beta_7^{Low} = \beta_7^{High}$ & " %5.3f `pval13' "& $\beta_7^{Open} = \beta_7^{Inc}$ & " %5.3f `pval23' "\\"
	noisily display "\midrule"
	noisily display "\addlinespace"			
	noisily display "District & \multirowcell{2}{\checkmark} & \multirowcell{2}{\checkmark} & \multirowcell{2}{\checkmark} & \multirowcell{2}{\checkmark} \\"
	noisily display "\hspace{6pt} \$\times$ Year FE &  &  & \\"

	noisily display "Obs."
	forvalues i = 1/4 {
		estimates restore est`i'
		local obs = e(N)
		noisily display "&" %6.0fc `obs'
	}
	
	noisily display "\\"	
	noisily display "\midrule\midrule"
	noisily display "\end{tabular}"
	noisily display "\begin{tablenotes}"
	noisily display "\footnotesize"
	noisily display "\item \textit{Notes:}"
	noisily display "Robust standard errors, clustered at the District \$\times$ Year level, are in parentheses."
	noisily display "Control variables are included in all columns."
	noisily display "\item *** \$p<0.01$; ** \$p<0.05\$; * \$p<0.1\$."
	noisily display "\end{tablenotes}"
	noisily display "\end{threeparttable}"
	noisily display "\end{table}"
  
	log off
  
	log close
}


*************
* Table D.1 *
*************

local controls "totpop d_totalvoters pct_school"

foreach x of local controls {
	rename `x' x
	bysort dist_year: egen `x' = total(x), missing
	drop x
}
egen btype = group(ballot_type)

bysort sd_year: egen num_ballot = max(btype)
gen ballot1 = (ballot_type == "A")

keep year sido sgg dist sd_year sgg_year dist_year `controls' btype ballot_type ballot1 num_ballot
duplicates drop

label var d_totalvoters "Number of Voters (Thousand)"
label var totpop        "Total Population"
label var pct_school    "Pct. School-Age Population"

eststo clear
eststo est1: quietly  reg ballot1 `controls' i.num_ballot i.year, cluster(sgg_year)
eststo est2: quietly areg ballot1 `controls' i.num_ballot       , cluster(sgg_year) a(sd_year)
eststo est3: quietly areg ballot1 `controls' i.num_ballot       , cluster(sgg_year) a(sgg_year)

local table_title = "District Characteristics and Ballot Type"
local table_name  = "tabled1"

esttab using "`table_name'_tmp.tex", ///
	replace label nomtitles fragment booktabs nonumbers nolines ///
	star(* 0.1 ** 0.05 *** 0.01) nodepvar nonote b(%5.3f) se(%5.3f) noobs ///
	keep  (`controls') ///
	order (`controls')

quietly {

	capture log close
  
	log using "`table_name'.tex", text replace

	noisily display "\begin{table}[htbp]"
	noisily display "\centering"
    noisily display "\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}"	
	noisily display "\begin{threeparttable}"
	noisily display "\caption{`table_title'}"
	noisily display "\label{`table_name'}"
	noisily display "\begin{tabular}{lccc}"
	noisily display "\midrule\midrule"
	noisily display "&\multicolumn{3}{c}{Outcome: First Ballot Type}\\"
	noisily display "\cmidrule(r){2-4}"
    noisily display "&\multicolumn{1}{c}{(1)} &\multicolumn{1}{c}{(2)}&\multicolumn{1}{c}{(3)}\\"
	noisily display "\midrule"
	noisily display "\addlinespace"
	noisily display "\addlinespace"
	noisily display "\expandableinput `table_name'_tmp.tex"
	noisily display "\addlinespace"
	noisily display "\midrule"
	noisily display "Year FE & \checkmark & &  \\"
	noisily display "Province &  & \multirowcell{2}{\checkmark} &    \\"
	noisily display "\hspace{6pt} \$\times$ Year FE  &  &  & \\"
	noisily display "\addlinespace"
	noisily display "Municipality  &  &  & \multirowcell{2}{\checkmark}  \\"
	noisily display "\hspace{6pt} \$\times$ Year FE &  &  &   \\"
	
	noisily display "Obs."
	forvalues i = 1/3 {
		estimates restore est`i'
		local obs = e(N)
		noisily display "&" %6.0fc `obs'
	}
	
	noisily display "\\"	
	noisily display "\midrule\midrule"
	noisily display "\end{tabular}"
	noisily display "\begin{tablenotes}"
	noisily display "\footnotesize"
	noisily display "\item \textit{Notes:}"
	noisily display "Robust standard errors, clustered at the Municipality \$\times$ Year level, are in parentheses."
	noisily display "Dummy variables indicating the number of ballot types are included in all columns."
	noisily display "\item *** \$p<0.01$; ** \$p<0.05\$; * \$p<0.1\$."
	noisily display "\end{tablenotes}"
	noisily display "\end{threeparttable}"
	noisily display "\end{table}"
  
	log off
  
	log close
}


*************
* Table E.1 *
*************

eststo clear
eststo est1: quietly areg vs d1 `controls', a(year)      cluster(dist_year)
eststo est2: quietly areg vs d1 `controls', a(sd_year)   cluster(dist_year)
eststo est3: quietly areg vs d1 `controls', a(dist_year) cluster(dist_year)

local table_title = "The Effect of Ballot Position"
local table_name  = "tablee1"

esttab using "`table_name'_tmp.tex", ///
	replace label nomtitles fragment booktabs nonumbers nolines ///
	star(* 0.1 ** 0.05 *** 0.01) nodepvar nonote b(%5.3f) se(%5.3f) noobs ///
	keep  (d1) ///
	order (d1)

quietly {

	capture log close
  
	log using "`table_name'.tex", text replace

	noisily display "\begin{table}[htbp]"
	noisily display "\centering"
    noisily display "\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}"	
	noisily display "\begin{threeparttable}"
	noisily display "\caption{`table_title'}"
	noisily display "\label{`table_name'}"
	noisily display "\begin{tabular}{lccc}"
	noisily display "\midrule\midrule"
	noisily display "&\multicolumn{3}{c}{Outcome: Vote Share}\\"
	noisily display "\cmidrule(r){2-4}"
    noisily display "&\multicolumn{1}{c}{(1)} &\multicolumn{1}{c}{(2)}&\multicolumn{1}{c}{(3)}\\"
	noisily display "\midrule"
	noisily display "\addlinespace"
	noisily display "\expandableinput `table_name'_tmp.tex"
	noisily display "\addlinespace"
	noisily display "\midrule"
	noisily display "Year FE & \checkmark & &  \\"
	noisily display "Province & &  \multirowcell{2}{\checkmark} &  \\"
	noisily display "\hspace{6pt} \$\times$ Year FE & & &  \\"
	noisily display "\addlinespace"
	noisily display "District &  & & \multirowcell{2}{\checkmark}   \\"
	noisily display "\hspace{6pt} \$\times$ Year FE &  & &    \\"
	
	noisily display "Obs."
	forvalues i = 1/3 {
		estimates restore est`i'
		local obs = e(N)
		noisily display "&" %6.0fc `obs'
	}
	
	noisily display "\\"	
	noisily display "\midrule\midrule"
	noisily display "\end{tabular}"
	noisily display "\begin{tablenotes}"
	noisily display "\footnotesize"
	noisily display "\item \textit{Notes:}"
	noisily display "Robust standard errors, clustered at the District \$\times$ Year level, are in parentheses."
	noisily display "Control variables are included in all columns."
	noisily display "\item *** \$p<0.01$; ** \$p<0.05\$; * \$p<0.1\$."
	noisily display "\end{tablenotes}"
	noisily display "\end{threeparttable}"
	noisily display "\end{table}"
  
	log off
  
	log close
}


*************
* Table F.1 *
*************

eststo clear
eststo est1: quietly areg vs d2 color2 ideo2 vspr_p2 d2Xvspr_p2 color2Xvspr_p2 ideo2Xvspr_p2 `controls', a(sd_year)  cluster(dist_year)
eststo est2: quietly areg vs d2 color2 ideo2 vspr_p2 d2Xvspr_p2 color2Xvspr_p2 ideo2Xvspr_p2 `controls', a(dist_year)  cluster(dist_year)

forvalues i = 1/2 {
	estimates restore est`i'
	quietly test d2Xvspr_p2 = color2Xvspr_p2
	local pdcolor`i' = r(p)
	quietly test d2Xvspr_p2 = ideo2Xvspr_p2
	local pdideo`i' = r(p)
	quietly test color2Xvspr_p2 = ideo2Xvspr_p2
	local pcolorideo`i' = r(p)
}


local table_title = "Ballot Position, Partisan Color, Ideology, and Party Voting (Second Position)"
local table_name  = "tablef1"

esttab using "`table_name'_tmp.tex", ///
	replace label nomtitles fragment booktabs nonumbers nolines ///
	star(* 0.1 ** 0.05 *** 0.01) nodepvar nonote b(%5.3f) se(%5.3f) noobs ///
	keep  (d2 color2 ideo2 vspr_p2 d2Xvspr_p2 color2Xvspr_p2 ideo2Xvspr_p2) ///
	order (d2 color2 ideo2 vspr_p2 d2Xvspr_p2 color2Xvspr_p2 ideo2Xvspr_p2) ///
	substitute("XX" "$\times$ \\ \hspace{6pt}") 

quietly {

	capture log close
  
	log using "`table_name'.tex", text replace

	noisily display "\begin{table}[!htb]"
	noisily display "\centering"
    noisily display "\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}"	
	noisily display "\begin{threeparttable}"
	noisily display "\caption{`table_title'}"
	noisily display "\label{`table_name'}"
	noisily display "\begin{tabular}{lcc}"
	noisily display "\midrule\midrule"
	noisily display "&\multicolumn{2}{c}{Outcome: Vote Share}\\"
	noisily display "\cmidrule(r){2-3}"
    noisily display "&\multicolumn{1}{c}{(1)} &\multicolumn{1}{c}{(2)}\\"
	noisily display "\midrule"
	noisily display "\addlinespace"
	noisily display "\expandableinput `table_name'_tmp.tex"
	noisily display "\addlinespace"
	noisily display "\midrule"
	noisily display _asis " $ p$-value of equality test: && \\" 
	noisily display _asis "$\beta_5 = \beta_6 $ &" %5.3f `pdcolor1' "& "  %5.3f `pdcolor2'  "\\"
	noisily display _asis "$\beta_5 = \beta_7 $ &" %5.3f `pdideo1'  "& "  %5.3f `pdideo2'   "\\"
	noisily display _asis "$\beta_6 = \beta_7 $ &" %5.3f `pcolorideo1' "&"  %5.3f `pcolorideo2'  "\\"
	noisily display "\midrule"
	noisily display "Province & \multirowcell{2}{\checkmark}  & \\"
	noisily display "\hspace{6pt} \$\times$ Year FE &  &  \\"
	noisily display "\addlinespace"
	noisily display "District & & \multirowcell{2}{\checkmark}  \\"
	noisily display "\hspace{6pt} \$\times$ Year FE & & \\"
	
	noisily display "Obs."
	forvalues i = 1/2 {
		estimates restore est`i'
		local obs = e(N)
		noisily display "&" %6.0fc `obs'
	}
	
	noisily display "\\"	
	noisily display "\midrule\midrule"
	noisily display "\end{tabular}"
	noisily display "\begin{tablenotes}"
	noisily display "\footnotesize"
	noisily display "\item \textit{Notes:}"
	noisily display "Robust standard errors, clustered at the District \$\times$ Year level, are in parentheses."
	noisily display "Control variables are included in all columns."
	noisily display "\item *** \$p<0.01$; ** \$p<0.05\$; * \$p<0.1\$."
	noisily display "\end{tablenotes}"
	noisily display "\end{threeparttable}"
	noisily display "\end{table}"
  
	log off
  
	log close

}
